Auto merge of #1697 - alexcrichton:fix-path-pkgid, r=brson
authorbors <bors@rust-lang.org>
Mon, 8 Jun 2015 22:31:51 +0000 (22:31 +0000)
committerbors <bors@rust-lang.org>
Mon, 8 Jun 2015 22:31:51 +0000 (22:31 +0000)
commit1ae683a1496be2e35f213e3e11645adcb3ed62b1
treeedbf70b08a47757c6a49f5559b02872171a85375
parent78f4080a216a3e30365a82e9a4f6d3336d9ab0ed
parentddf3c7955a51d251779fee9e971d3d30ed55ebaf
Auto merge of #1697 - alexcrichton:fix-path-pkgid, r=brson

The method of creating package ids in Cargo means that all sub-crates of a main
repo have the same package id, which encodes the path it came from. This means
that if the "root crate" switches, the package id for all dependencies will
change, causing an alteration in package id hashes, causing recompiles.

This commit alters a few points of hashing to ensure that whenever a package is
being hashed for freshness the *source root* of the crate is used instead of the
root of the main crate. This cause the hashes to be consistent across compiles,
regardless of the root package.

Closes #1694